package com.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;


import com.dao.HuanzhebinganDao;
import com.entity.HuanzhebinganEntity;
import com.service.HuanzhebinganService;
import com.entity.vo.HuanzhebinganVO;
import com.entity.view.HuanzhebinganView;

@Service("huanzhebinganService")
public class HuanzhebinganServiceImpl extends ServiceImpl<HuanzhebinganDao, HuanzhebinganEntity> implements HuanzhebinganService {
	
	
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<HuanzhebinganEntity> page = this.selectPage(
                new Query<HuanzhebinganEntity>(params).getPage(),
                new EntityWrapper<HuanzhebinganEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
	public PageUtils queryPage(Map<String, Object> params, Wrapper<HuanzhebinganEntity> wrapper) {
		  Page<HuanzhebinganView> page =new Query<HuanzhebinganView>(params).getPage();
	        page.setRecords(baseMapper.selectListView(page,wrapper));
	    	PageUtils pageUtil = new PageUtils(page);
	    	return pageUtil;
 	}
    
    @Override
	public List<HuanzhebinganVO> selectListVO(Wrapper<HuanzhebinganEntity> wrapper) {
 		return baseMapper.selectListVO(wrapper);
	}
	
	@Override
	public HuanzhebinganVO selectVO(Wrapper<HuanzhebinganEntity> wrapper) {
 		return baseMapper.selectVO(wrapper);
	}
	
	@Override
	public List<HuanzhebinganView> selectListView(Wrapper<HuanzhebinganEntity> wrapper) {
		return baseMapper.selectListView(wrapper);
	}

	@Override
	public HuanzhebinganView selectView(Wrapper<HuanzhebinganEntity> wrapper) {
		return baseMapper.selectView(wrapper);
	}


}
